#!/bin/sh
# ccnd/ccndbloomstats
# 
# Part of the CCNx distribution.
#
# Copyright (C) 2009 Palo Alto Research Center, Inc.
#
# This work is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.
# This work is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.
#
# This munches the messages produced when ccnd_debug_bloom = 1
#
grep ^Bloom > /tmp/bloomstats.$$
cat /tmp/bloomstats.$$ | sort -u | cut -d , -f 1-3 | sort | uniq -c
echo ================================================
cat /tmp/bloomstats.$$ | sort -u | cut -d , -f 4 | sort | uniq -c | sort -n | grep sig | cut -f 1 -d = | uniq -c
rm -f /tmp/bloomstats.$$
